<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    const sum = (num1, num2) => num1 + num2;
    // 上述代码等价于
    // const sum = (num1, num2) => {
    //   return num1 + num2;
    // };
    const result = sum(10, 20); // 使用result去接收sum()函数执行的结果
    console.log(result);        // 在控制台中去输出result值，结果为30
  </script>
</body>
</html>